package lt.f2g.domain.security;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;

@Entity
public class UserRole implements Serializable {

    @Id
    @Column(name="ROLE_NAME")
    private String name;
    
    @OneToMany
    @JoinColumn(name="PRIVILEGE_ID")
    private List<UserPrivilege> privileges;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<UserPrivilege> getPrivileges() {
        return privileges;
    }

    public void setPrivileges(List<UserPrivilege> privileges) {
        this.privileges = privileges;
    }

}